<?php
namespace app\common\controller;

use app\common\model\notice\NoticeAnnounce;

class GetAnnounce
{
    /**
     * 获取公告列表
     * @param int $num   查询几条数据
     */
    public static function getAnnounce($num=0){
        $info = NoticeAnnounce::where(['state'=>1])->order('id desc')->paginate($num)->toArray();
        return $info;
    }
    /**
     * 获取公告详情
     */
    public static function AnnounceDetail($id){
        $info=NoticeAnnounce::get($id);
        return $info;
    }
}